package com.manor.main.fragment.user

import com.manor.common.bean.ShortVideoBean

/**
 *
 *
 *
 * @date  2020/7/15  16:43
 * @version 1.0
 */
object UserSvManager {


    /**
     * 当前页数
     */
    var curPageNum = 0

    /**
     * 同步位置
     */
    var syncPos = 0

    val dataSource = mutableListOf<ShortVideoBean>()


    fun record(position: Int) {
        this.syncPos = position
    }

    fun savePage(num: Int) {
        this.curPageNum = num
    }

    fun syncData() {
    }

    fun setDataSource(data: MutableList<ShortVideoBean>) {
        dataSource.clear()
        dataSource.addAll(data)
    }

    fun addDataSource(data: MutableList<ShortVideoBean>) {
        dataSource.addAll(data)
    }

    fun clearDataSource() {
        this.curPageNum = 0
        this.syncPos = 0
        dataSource.clear()
    }


}